//
//  MingPianViewController.m
//  YeDian
//
//  Created by Mac on 14-5-18.
//  Copyright (c) 2014年 Mac. All rights reserved.
//

#import "MingPianViewController.h"

#import "MPHeadTableViewCell.h"
#import "MPTableViewCell.h"
#import "MPDesTableViewCell.h"

@interface MingPianViewController ()

@end

@implementation MingPianViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}
- (IBAction)backAction:(id)sender {
    
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


#pragma mark - table

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    if (indexPath.row==0) {
        return 70;//基本信息
    }
    else if(indexPath.row==9){
        return 75;
    }
    else{
        
        return 44;
    }
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return 10;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    if (indexPath.row==0) {
        MPHeadTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MPHeadTableViewCell" forIndexPath:indexPath];
        return cell;
    }
    else if(indexPath.row==9){
        MPDesTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MPDesTableViewCell" forIndexPath:indexPath];
        return cell;
    }
    else{
        NSArray *nameArr = @[@"夜店中国号:",@"昵称:",@"性别:",@"生日:",@"身高:",@"体重:",@"所在地:",@"故乡:"];
        NSArray *valueArr = @[@"1232133",@"流年",@"男",@"1996-12-02",@"180cm",@"60km",@"上海",@"北京"];
        MPTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MPTableViewCell" forIndexPath:indexPath];
        cell.nameLab.text = nameArr[indexPath.row-1];
        cell.valueLab.text = valueArr[indexPath.row-1];
        return cell;
    }

}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
